package com.ecmcloud.resource;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ecmcloud.common.dto.Result;
import com.ecmcloud.entity.UserField;
import com.ecmcloud.service.IUserFieldService;
import com.ecmcloud.vo.UserFieldParamVO;

/**
 * <p>
 * 用户字段 前端控制器
 * </p>
 */
@RestController
@RequestMapping(value = {"userField","api/userField"})
public class UserFieldController {
	
	@Autowired
    private IUserFieldService userFieldService;

    /**
     * 保存变量
     * @param userFieldParamVOList
     * @return
     */
    @PostMapping("save")
    public Result<String> save(@RequestBody List<UserFieldParamVO> userFieldParamVOList){
        return userFieldService.save(userFieldParamVOList);
    }

    
    /**
     * 查询用户属性字段
     * @return
     */
    @GetMapping("queryAll")
    public Result<List<UserField>> queryAll(){
        return userFieldService.queryAll();
    }
}
